package com.slkj.shilixiaoyuanapp.entity;

import com.contrarywind.interfaces.IPickerViewData;

import java.util.List;

/**
 * Created  on 2018-07-30
 *
 * @author 唐开阔
 * @describe
 */
public class UserEntity {


    /**
     * userToken : 4429545E85A8159137D9B11F56657DA0
     * teacherSchoolId : 3
     * defaultRole : 2
     * school : [{"database":"//127.0.0.1:3306/shili_test","role":"[2]","id":3}]
     * datasource : //127.0.0.1:3306/shili_test
     * roles : [2]
     * teacherSchoolDatabase : //127.0.0.1:3306/shili_test
     * students : []
     * menu : [{"amId":6,"amName":"思想品德","amParent":1,"amRole":0,"amState":1},{"amId":7,"amName":"学业水平","amParent":1,"amRole":0,"amState":1},{"amId":8,"amName":"身心健康","amParent":1,"amRole":0,"amState":1},{"amId":9,"amName":"艺术素养","amParent":1,"amRole":0,"amState":1},{"amId":10,"amName":"社会实践","amParent":1,"amRole":0,"amState":1},{"amId":11,"amName":"行为习惯","amParent":1,"amRole":0,"amState":1}]
     * user : {"uRegAddress":"","headImg":"http://47.106.8.136:8081/images/school3/head/1538187063123.png","uAddress":"四川成都","uPhone":"17723116991","uSex":1,"uIntime":"2017-08-18 11:37:24","uNickName":"下一站幸福","uWorkNumber":"1234","uIdCard":"513030199111226718","uRegType":1,"uState":1,"uLoginUserId":3,"uName":"任浩","id":2,"uNation":"汉族","uRole":2,"uAutograph":"这个人很懒，什么也没留下~","uEducation":4,"uBirrthday":"1991-11-10","uGraduateSchool":"四川师范大学"}
     * classX : [{"classId":32,"className":"二年级一班","subjectId":1},{"classId":2,"className":"四年级七班","subjectId":2},{"classId":3,"className":"四年级一班","subjectId":3},{"classId":1,"className":"四年级四班","subjectId":1}]
     */

    private String userToken;
    private int teacherSchoolId;
    //1：家长，2是老师
    private int defaultRole;
    private String datasource;
    private String teacherSchoolDatabase;
    private User user;
    private List<SchoolEntity> school;
    private List<Integer> roles;
    private List<MenuEntity> menu;
    private List<ClassXEntity> classX;
    private String extraDatasourse;
    //“2”是中和小学
    private String schoolFlag;
    public String getExtraDatasourse() {
        return extraDatasourse;
    }

    public void setExtraDatasourse(String extraDatasourse) {
        this.extraDatasourse = extraDatasourse;
    }

    public String getSchoolFlag() {
        return schoolFlag;
    }
    //是否是中和小学
    public boolean isZhxx() {
        if (schoolFlag == null){
            return false;
        }
        return schoolFlag.equals("2");
    }
    public void setSchoolFlag(String schoolFlag) {
        this.schoolFlag = schoolFlag;
    }

    private List<StudentEntity> students;
    public String getUserToken() {
        return userToken;
    }

    public void setUserToken(String userToken) {
        this.userToken = userToken;
    }

    public int getTeacherSchoolId() {
        return teacherSchoolId;
    }

    public void setTeacherSchoolId(int teacherSchoolId) {
        this.teacherSchoolId = teacherSchoolId;
    }

    public int getDefaultRole() {
        return defaultRole;
    }

    public void setDefaultRole(int defaultRole) {
        this.defaultRole = defaultRole;
    }

    public String getDatasource() {
        return datasource;
    }

    public void setDatasource(String datasource) {
        this.datasource = datasource;
    }

    public String getTeacherSchoolDatabase() {
        return teacherSchoolDatabase;
    }

    public void setTeacherSchoolDatabase(String teacherSchoolDatabase) {
        this.teacherSchoolDatabase = teacherSchoolDatabase;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<SchoolEntity> getSchool() {
        return school;
    }

    public void setSchool(List<SchoolEntity> school) {
        this.school = school;
    }

    public List<Integer> getRoles() {
        return roles;
    }

    public void setRoles(List<Integer> roles) {
        this.roles = roles;
    }

    public List<StudentEntity> getStudents() {
        return students;
    }

    public void setStudents(List<StudentEntity> students) {
        this.students = students;
    }

    public List<MenuEntity> getMenu() {
        return menu;
    }

    public void setMenu(List<MenuEntity> menu) {
        this.menu = menu;
    }

    public List<ClassXEntity> getClassX() {
        return classX;
    }

    public void setClassX(List<ClassXEntity> classX) {
        this.classX = classX;
    }
    public static class StudentEntity   implements IPickerViewData {

        /**
         * datasource : //127.0.0.1:3306/shili_test
         * name : renhao
         * isSelect : 0
         * id : 1818
         */

        private String datasource;
        private String name;
        private int isSelect;
        private int id;
        private String head;
        private int sex;
        private String className;
        private int classId;
        private int schoolId;

        public int getSchoolId() {
            return schoolId;
        }

        public void setSchoolId(int schoolId) {
            this.schoolId = schoolId;
        }

        public int getClassId() {
            return classId;
        }

        public void setClassId(int classId) {
            this.classId = classId;
        }

        public String getHead() {
            return head;
        }

        public void setHead(String head) {
            this.head = head;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public String getDatasource() {
            return datasource;
        }

        public void setDatasource(String datasource) {
            this.datasource = datasource;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getIsSelect() {
            return isSelect;
        }

        public void setIsSelect(int isSelect) {
            this.isSelect = isSelect;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        @Override
        public String getPickerViewText() {
            return name;
        }
    }
    public static class User{
        /**
         * uRegAddress :
         * headImg : http://47.106.8.136:8081/images/school3/head/1538187063123.png
         * uAddress : 四川成都
         * uPhone : 17723116991
         * uSex : 1
         * uIntime : 2017-08-18 11:37:24
         * uNickName : 下一站幸福
         * uWorkNumber : 1234
         * uIdCard : 513030199111226718
         * uRegType : 1
         * uState : 1
         * uLoginUserId : 3
         * uName : 任浩
         * id : 2
         * uNation : 汉族
         * uRole : 2
         * uAutograph : 这个人很懒，什么也没留下~
         * uEducation : 4
         * uBirrthday : 1991-11-10
         * uGraduateSchool : 四川师范大学
         */

        private String uRegAddress;
        private String headImg;
        private String uAddress;
        private String uPhone;
        private int uSex;
        private String uIntime;
        private String uNickName;
        private String uWorkNumber;
        private String uIdCard;
        private int uRegType;
        private int uState;
        private int uLoginUserId;
        private String uName;
        private int id;
        private String uNation;
        private int uRole;
        private String uAutograph;
        private int uEducation;
        private String uBirrthday;
        private String uGraduateSchool;

        public String getURegAddress() {
            return uRegAddress;
        }

        public void setURegAddress(String uRegAddress) {
            this.uRegAddress = uRegAddress;
        }

        public String getHeadImg() {
            return headImg;
        }

        public void setHeadImg(String headImg) {
            this.headImg = headImg;
        }

        public String getUAddress() {
            return uAddress;
        }

        public void setUAddress(String uAddress) {
            this.uAddress = uAddress;
        }

        public String getUPhone() {
            return uPhone;
        }

        public void setUPhone(String uPhone) {
            this.uPhone = uPhone;
        }

        public int getUSex() {
            return uSex;
        }

        public void setUSex(int uSex) {
            this.uSex = uSex;
        }

        public String getUIntime() {
            return uIntime;
        }

        public void setUIntime(String uIntime) {
            this.uIntime = uIntime;
        }

        public String getUNickName() {
            return uNickName;
        }

        public void setUNickName(String uNickName) {
            this.uNickName = uNickName;
        }

        public String getUWorkNumber() {
            return uWorkNumber;
        }

        public void setUWorkNumber(String uWorkNumber) {
            this.uWorkNumber = uWorkNumber;
        }

        public String getUIdCard() {
            return uIdCard;
        }

        public void setUIdCard(String uIdCard) {
            this.uIdCard = uIdCard;
        }

        public int getURegType() {
            return uRegType;
        }

        public void setURegType(int uRegType) {
            this.uRegType = uRegType;
        }

        public int getUState() {
            return uState;
        }

        public void setUState(int uState) {
            this.uState = uState;
        }

        public int getULoginUserId() {
            return uLoginUserId;
        }

        public void setULoginUserId(int uLoginUserId) {
            this.uLoginUserId = uLoginUserId;
        }

        public String getUName() {
            return uName;
        }

        public void setUName(String uName) {
            this.uName = uName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getUNation() {
            return uNation;
        }

        public void setUNation(String uNation) {
            this.uNation = uNation;
        }

        public int getURole() {
            return uRole;
        }

        public void setURole(int uRole) {
            this.uRole = uRole;
        }

        public String getUAutograph() {
            return uAutograph;
        }

        public void setUAutograph(String uAutograph) {
            this.uAutograph = uAutograph;
        }

        public int getUEducation() {
            return uEducation;
        }

        public void setUEducation(int uEducation) {
            this.uEducation = uEducation;
        }

        public String getUBirrthday() {
            return uBirrthday;
        }

        public void setUBirrthday(String uBirrthday) {
            this.uBirrthday = uBirrthday;
        }

        public String getUGraduateSchool() {
            return uGraduateSchool;
        }

        public void setUGraduateSchool(String uGraduateSchool) {
            this.uGraduateSchool = uGraduateSchool;
        }
    }

    public static class SchoolEntity {
        /**
         * database : //127.0.0.1:3306/shili_test
         * role : [2]
         * id : 3
         */

        private String database;
        private String role;
        private int id;

        public String getDatabase() {
            return database;
        }

        public void setDatabase(String database) {
            this.database = database;
        }

        public String getRole() {
            return role;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }

    public static class MenuEntity {
        /**
         * amId : 6
         * amName : 思想品德
         * amParent : 1
         * amRole : 0
         * amState : 1
         */

        private int amId;
        private String amName;
        private int amParent;
        private int amRole;
        private int amState;

        public int getAmId() {
            return amId;
        }

        public void setAmId(int amId) {
            this.amId = amId;
        }

        public String getAmName() {
            return amName;
        }

        public void setAmName(String amName) {
            this.amName = amName;
        }

        public int getAmParent() {
            return amParent;
        }

        public void setAmParent(int amParent) {
            this.amParent = amParent;
        }

        public int getAmRole() {
            return amRole;
        }

        public void setAmRole(int amRole) {
            this.amRole = amRole;
        }

        public int getAmState() {
            return amState;
        }

        public void setAmState(int amState) {
            this.amState = amState;
        }
    }

    public static class ClassXEntity {
        /**
         * classId : 32
         * className : 二年级一班
         * subjectId : 1
         */

        private int classId;
        private String className;
        private int subjectId;

        public int getClassId() {
            return classId;
        }

        public void setClassId(int classId) {
            this.classId = classId;
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public int getSubjectId() {
            return subjectId;
        }

        public void setSubjectId(int subjectId) {
            this.subjectId = subjectId;
        }
    }
}
